package linuxbox.resource.logic;

public class BoxResourceEntry
{
	protected	int m_iID = 0;
	protected	int m_iCategory = 0;
	protected	int m_iAllowPeople = 0;
	protected String m_sName = "";
	protected String m_sDescription = "";
	protected	String m_sLocation = "";

  public void copyFrom(BoxResourceEntry entry)
  {
    m_iID = entry.getID();
    m_iCategory = entry.getCategory();
	  m_iAllowPeople = entry.getAllowPeople();

    if (entry.getName() == null)
      m_sName = "";
    else
      m_sName = new String(entry.getName());
    if (entry.getDescription() == null)
      m_sDescription = "";
    else
      m_sDescription = new String(entry.getDescription());
    if (entry.getLocation() == null)
      m_sLocation = null;
    else
      m_sLocation = new String(entry.getLocation());
  }
	public int getID()
	{
		return m_iID;
	}
	public void setID(int id)
	{
		m_iID = id;
	}

  public String getName()
	{
    return m_sName;
	}
  public void setName(String s)
	{
    m_sName = s;
	}

  public String getDescription()
	{
    return m_sDescription;
	}
  public void setDescription(String s)
	{
    m_sDescription = s;
	}
	
  public String getLocation()
	{
    return m_sLocation;
	}
  public void setLocation(String s)
	{
    m_sLocation = s;
	}
	
  public int getCategory()
	{
    return m_iCategory;
	}
  public void setCategory(int p)
	{
    m_iCategory = p;
	}
	
  public int getAllowPeople()
  {
    return m_iAllowPeople;
  }
  public void setAllowPeople(int b)
  {
    m_iAllowPeople = b;
  }
    
  public String toString()
  {
    String s = "id=" + m_iID
	              + ", m_iCategory=" + m_iCategory
	              + ", m_iAllowPeople=" + m_iAllowPeople
	              + ", m_sName=" + m_sName
	              + ", m_sLocation=" + m_sLocation
	              + ", m_sDescription=" + m_sDescription
                + "\n";
    return s;
  }
}
